home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13491 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.9 KB

  1. Path: mail2news.demon.co.uk!tsys.demon.co.uk
  2. From: Tom Wheeley <tomw@tsys.demon.co.uk>
  3. Newsgroups: comp.lang.eiffel,comp.lang.c,comp.lang.c++,comp.object,comp.software-eng
  4. Subject: Re: Beware of "C" Hackers -- A rebuttal to Bertrand Meyer
  5. Date: Mon, 25 Mar 96 14:51:24 GMT
  6. Organization: City Zen FM
  7. Message-ID: <827765484snz@tsys.demon.co.uk>
  8. References: <1995Jul3.034108.4193@rcmcon.com> <31545B86.4CC0@iadfw.net> <4j26cn$gh7@solutions.solon.com> <3154A548.71FF@iadfw.net> <4j3p80INN567@keats.ugrad.cs.ubc.ca>
  9. Reply-To: tomw@tsys.demon.co.uk
  10. X-NNTP-Posting-Host: tsys.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.30
  12. X-Sig-By: Tomsystems Quote v1.2.  (c)1996 Tom Wheeley, tomw@tsys.demon.co.uk
  13. X-Mail2News-Path: tsys.demon.co.uk
  14.  
  15. In article <4j3p80INN567@keats.ugrad.cs.ubc.ca>
  16.            c2a192@ugrad.cs.ubc.ca "Kazimir Kylheku" writes:
  17.  
  18. > >interfacing with a file system, or manipluating strings, etc.   I didn't
  19. > >think of the library as a formal part of the C language.   Now, of course
  20. > Neither does the K&R2: this I think is a major flaw in the otherwise great
  21. > book. It never makes clear the concept that the standard library is a component
  22. > of the language. In fact, it claims the opposite:
  23. >         The standard library is not part of the C language proper, but an
  24. >         environment that supports standard C will provide the function
  25. >         declarations and type and macro definitions of this library.
  26. >         (beginning of Appendix B).
  27. > Not at all; that's the beauty of it! All of the standard library functions can
  28. > be implemented by essentially adding a compatible library and headers to a
  29. > ``freestanding'' implementation. The standard doesn't _require_ that you inline
  30. > any of the functions or that the compiler be aware of special semantics, but
  31. > the implementor has the freedom to do this. This is why the inclusion of
  32. > appropriate headers is still required when you use standard functions---for
  33. > example, you must include <stdlib.h> to call malloc(), or <stdio.h> to use
  34. > printf().  If the compiler were really required to know malloc or printf a
  35. > priori, the need for a header file could easily have been dropped long ago.
  36.  
  37. Surely you have just proved that the standard library is _not_ part of the
  38. C language.  At the risk of seeming -pedantic, I would say that the standard
  39. library is a part of the _standard C *implementation*_, but not a part of
  40. the standard C *language*.
  41.  
  42. That is why you can build the standard library within C -- you cannot write
  43. the entire standard library using the standard library, therefore if the
  44. standard library is a part of the C language, then the standard library is
  45. no longer written in the C language, but only a limited subset thereof.
  46.  
  47. I hope you understood that, I half expected to end up mentioning an index of
  48. everything that is not indexed... ;-)
  49.  
  50. .splitbung
  51. -- 
  52. * TQ 1.0 * The 'Just So Quotes'.
  53. Artificial Intelligence: the art of making computers that behave like the 
  54. ones in movies.
  55.     -- Bill Bulko
  56.